import axios from 'axios';
import Vue from 'vue';
const http = axios.create({
    baseURL: '/akon/',
    timeout:8000
});
// 拦截

// Add a request interceptor
http.interceptors.request.use(function (config) {
    Vue.$loading.show();
    return config;
}, function (error) {
    return Promise.reject(error);
});
http.interceptors.response.use(function (response) {
    Vue.$loading.hide();
    return response;
}, function (error) {
    return Promise.reject(error);
});
export default http;